<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="test">
        <div>1年龄：{{age}}  </div>
        <button v-show="isShow" @click="test1">v-show111</button>
        <button v-if="isShow" @click="test2">v-if111</button>
    </div>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    let vue = new Vue({
        el:"#test",
        data:{
            age:18,
            isShow:true
        },
        methods:{
           test1() {
                this.isShow = !this.isShow
           },
           test2() {
                this.isShow = !this.isShow
           }
        }
    });
    console.log(vue)
</script>